//
//  KLNavigationController.m
//  KLBookStore
//
//  Created by apple on 2017/10/14.
//  Copyright © 2017年 NetEaseExam. All rights reserved.
//

#import "KLNavigationController.h"

#import "KLBaseController.h"

@interface KLNavigationController ()

@end

@implementation KLNavigationController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [[UINavigationBar appearance] setBarTintColor:UIColorFromHexRGB(0x009D82)];
    [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
    [[UINavigationBar appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated {
    
    if ([viewController isKindOfClass:[KLBaseController class]]) {
        ((KLBaseController *)viewController).hidesBottomBarWhenPushed = [(KLBaseController *)viewController shouldHideBottomBarWhenPushed];
    } else {
        
    }
    [super pushViewController:viewController animated:YES];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
